/*
 * @Author       : ShiJunJie
 * @Date         : 2022-04-19 10:36:42
 * @LastEditors  : ShiJunJie
 * @LastEditTime : 2022-04-19 11:14:50
 * @FilePath     : /src/stores/routerNameMap.ts
 * @Descripttion : 
 */

import type { RouteRecordName } from "vue-router"

export const routerNameMap = {
  test: '测试',
  baseInfoCompanyConfig: '企业基本信息配置'
}

export const escapeStr = (str: RouteRecordName): RouteRecordName => {
  if (str) {
    const newStrArr = str?.toString().replace('undefined', '').split('-')
    return routerNameMap[newStrArr[newStrArr.length - 1]] || str
  } else {
    return str
  }
}
